package array;

import java.util.ArrayList;
import java.util.Vector;

//添加数组元素
public class AddItem {
    public static void main(String[] args) {
        //异步
        ArrayList arrayList = new ArrayList<>();
        arrayList.add(11);
        arrayList.add(22);
        System.out.println(arrayList);

        //同步
        Vector arrayList2 = new Vector<>();
        arrayList2.add(33);
        arrayList2.add(44);
        System.out.println(arrayList2);

        System.out.println(arrayList.size());
    }

}
